home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Environments / RAMSES 2.2 / RAMSES 2.2 Extras / DMBaseExtra / DMHeapWatch.DEF < prev    next >
Text File  |  1996-06-21  |  2KB  |  69 lines

  1. DEFINITION MODULE DMHeapWatch;
  2.  
  3.   (*******************************************************************
  4.  
  5.     Module  DMHeapWatch     DM_V2.2
  6.  
  7.               Copyright ©1989 by Andreas Fischlin and Swiss
  8.               Federal Institute of Technology Zürich ETHZ
  9.  
  10.       Version written for:
  11.               'Dialog Machine' DM_V2.2 (User interface)
  12.               MacMETH_V3.2     (1-Pass Modula-2 implementation)
  13.  
  14.       Purpose Watches allocation and deallocation of heap blocks
  15.                 during program execution.  If not all heap blocks
  16.                 are returned by the program at its end, a warning
  17.                 message will be displayed; it shows which allocation
  18.                 resp. deallocation routines may have not have returned
  19.                 memory
  20.               
  21.       Remarks Needs module DMDebugHelp
  22.               
  23.       Programming
  24.  
  25.           • Design
  26.               A. Fischlin         02/02/90
  27.  
  28.           • Implementation
  29.               A. Fischlin         02/02/90
  30.               
  31.           Swiss Federal Institute of Technology Zurich ETHZ
  32.           Department of Environmental Sciences
  33.           Systems Ecology Group
  34.           ETH-Zentrum
  35.           CH-8092 Zurich
  36.           Switzerland
  37.  
  38.           Last revision of definition:  05/11/90  af
  39.  
  40.   *******************************************************************)
  41.  
  42.   FROM SYSTEM IMPORT ADDRESS;
  43.   
  44.   CONST
  45.     maxBlocks = 15;
  46.     
  47.   TYPE
  48.     AllocInfo   =   PROCEDURE ( ADDRESS, ADDRESS, LONGINT, INTEGER );
  49.                              (* pBefore, pAfter,  size,    level  *)
  50.  
  51.     DeallocInfo =   PROCEDURE ( ADDRESS, ADDRESS, INTEGER );
  52.                              (* pBefore, pAfter,  level  *)
  53.  
  54.     
  55.   VAR
  56.     ptrCount, handleCount, windowCount, TECount, controlCount,
  57.     menuCount, dialogCount: INTEGER;
  58.     showLevels, debugProc: PROCEDURE ( ARRAY OF CHAR , INTEGER, LONGINT);
  59.     blockSizes: ARRAY [0..maxBlocks] OF LONGINT; (* report if a heap
  60.                                           block of the given
  61.                                           size is encountered 
  62.                                           in an allocate or
  63.                                           deallocate statement *)
  64.     allocInfoProc  : AllocInfo;                      
  65.     deallocInfoProc: DeallocInfo;                      
  66.  
  67.  
  68. END DMHeapWatch.
  69.